Skip to main content

sc.language

This lets you get translations from the mod


Structure

Language

A language from the language manager, Each element inside it is a translation, index & value are strings.

NOTE: Translations get passed through string.format! Some use them and others dont.


Functions

getLanguages

sc.language.getLanguages()

Gets all loaded languages and returns them

Returns:


getTotalLanguages

sc.language.getTotalLanguages()

Gets the total loaded languages and returns the amount

Returns:

  • [ integer ] The total amount of loaded languages

getSelectedLanguage

sc.language.getSelectedLanguage()

Gets the current selected language.

Returns:

  • [ string ] The selected language

translatable

sc.language.translatable( text, ... )

Translates text

Arguments:

  • text [ string ] The text to translate
  • ... [ any|any[] ] The parameters of the translated text

Returns:

  • [ string ] The translated text, Will return the same param as text if not found.